<?php

namespace App\Http\Requests;

/**
 * 微信用户标签验证器
 * @package App\Http\Requests
 */
class AdminWxUserTagPost extends AdminBaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'tag_name' => 'required',
            'parent_id' => 'required',
            'order_num' => 'integer|min:0',
        ];
    }

    /**
     * 定义错误信息
     * @return array
     */
    public function messages()
    {
        return [
            'tag_name.required' => '请输入标签名称',
            'order_num.min' => '排序数值必须大于或等于0',
        ];
    }
}
